/**
* @(#)com.pylc.model.dao.impl.MemberPointsLogDaoImpl.java
* 
* @date 2012-6-17
*/
package com.pylc.model.dao.impl;

import com.pylc.model.dao.MemberPointsLogDao;
import com.pylc.model.entity.Admin;
import com.pylc.model.entity.Member;
import com.pylc.model.entity.MemberPointsLog;
import com.pylc.model.entity.Point;

/** 
 * 
 * @author <a href="mailto:yuanyichen@gmail.com">（H0rol4</a>
 * @version 1.0 
 */

public class MemberPointsLogDaoImpl extends
		BaseDaoImpl<MemberPointsLog, Long> implements MemberPointsLogDao {

	public Admin getAdmin(String adminId) {
		String hql = " from Admin admin where admin.id = ? ";
		return (Admin) getSession().createQuery(hql).setParameter(0, adminId).uniqueResult();
	}

	public Member getMember(String memberId) {
		String hql = " from Member member where member.id = ? ";
		return (Member) getSession().createQuery(hql).setParameter(0, memberId).uniqueResult();
	}

	public Point getPoint(String pointId) {
		String hql = " from Point point where point.id = ? ";
		return (Point) getSession().createQuery(hql).setParameter(0, pointId).uniqueResult();
	}
}
